package com.yw.atp.web;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.struts2.interceptor.RequestAware;
import org.apache.struts2.interceptor.SessionAware;
import org.springframework.beans.factory.annotation.Autowired;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.Preparable;

/**
 * base class for all Actions.
 */
public class ActionBase extends ActionSupport implements Preparable, RequestAware, SessionAware {

    protected final Log logger = LogFactory.getLog(getClass());
    private Exception exception;
    private Map session;
    
    public Exception getException() {
        return exception;
    }

    public void setException(Exception exception) {
        this.exception = exception;
    }

    public void prepare() throws Exception {
    }

    public void setSession(Map session) {
        if(session==null){
            session = new HashMap();
        }
        this.session = session;
    }

    public Map getSession() {
        return session;
    }

    public void setRequest(Map arg0) {
        
    }
}

